#ifndef CKKS_SRC_EVALUATOR_UTILS_H_
#define CKKS_SRC_EVALUATOR_UTILS_H_

#include "context.h"

class EvaluatorUtils {
public:
    // 拷贝构造函数
    EvaluatorUtils(const EvaluatorUtils &utils) = delete;
    EvaluatorUtils &operator = (const EvaluatorUtils &utils) = delete;
    // 移动构造函数
    EvaluatorUtils(EvaluatorUtils &&utils) = delete;
    EvaluatorUtils &operator = (EvaluatorUtils &&utils) = delete;
    
    /* *
     * generate random real value in range (0, bound).
     */
    static double RandomReal(double bound = 1.0);

    /* *
     * generate random complex value with both real and imaginary part in range (0, bound).
     */
    static complex<double> RandomComplex(double bound = 1.0);

    /* *
     * generate random complex value with norm 1 and angle bound in (0, anglebound) in radiant
     */
    static complex<double> RandomCircle(double angleBound = 1.0);

    /* *
     * generate array of random real values in range (0, bound)
     */
    static double *RandomRealArray(long size, double bound = 1.0);

    /* *
     * generate array of random complex values with both real and imaginary part in range (0, bound).
     */
    static complex<double> *RandomComplexArray(long size, double bound = 1.0);

    /* *
     * generate array of random complex values with norm 1 and angle bound in (0, anglebound) in radiant
     */
    static complex<double> *RandomCircleArray(long size, double bound = 1.0);

    static void LeftRotateAndEqual(complex<double> *vals, const long size, const long rotSize);

    static void RightRotateAndEqual(complex<double> *vals, const long size, const long rotSize);
};

#endif
